﻿using AutoMapper;
using Easy.Services.Dtos;
using Easy.Services.Entities;

namespace Easy.API.AutoMapper
{
    public class AutoMapperConfig : Profile
    {
        /// <summary>
        /// 
        /// </summary>
        public AutoMapperConfig()
        {
            CreateMap<User, UserDTO>();
            CreateMap<UserDTO, User>();
            CreateMap<User, AddUserDTO>();
            CreateMap<AddUserDTO, User>();
            CreateMap<User, UpdateUserDTO>();
            CreateMap<UpdateUserDTO, User>();

            CreateMap<Role, RoleDTO>();
            CreateMap<RoleDTO, Role>();

            CreateMap<Permission, PermissionDTO>();
            CreateMap<PermissionDTO, Permission>();
            CreateMap<Permission, UpdatePermissionDTO>();
            CreateMap<UpdatePermissionDTO, Permission>();
            
            CreateMap<Company, CompanyDTO>();
            CreateMap<CompanyDTO, Company>();
            CreateMap<Company, AddCompanyDTO>();
            CreateMap<AddCompanyDTO, Company>();

            CreateMap<Inter, AddInterDTO>();
            CreateMap<AddInterDTO, Inter>();


        }
    }
}
